package com.ceshi.vo;
import java.io.Serializable;

/**
 * @description: 返回结果包装
 * @author: Luo
 * @create: 2020-07-14 15:39
 */
public class JsonResult<T> implements Serializable {
    private String code;
    private T data;
    private String msg;
    public JsonResult(T data){
        this.code= ResponseCodeEnum.SUCCESS.getCode();
        this.msg = ResponseCodeEnum.SUCCESS.getMessage();
        this.data=data;
    }
    public JsonResult(String code, String msg){
        this.code=code;
        this.msg=msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
